
#include <cstdio>
#include <BString>
#include "ILibStdio.h"

using namespace BWE;

ILibrary* ILibStdio::Instance()
{
	static ILibrary library("cstdio");
	if (library.empty())
	{
		library.registFunction("void puts(const string& text)", puts);
	}
	return &library;
}

void ILibStdio::puts(int argc, BValue* argv)
{
	const BString& str1 = argv[1];
	std::puts(str1.cstr());
}
